<!--
/**
 * 数据库 列表页 JS 脚本
 * @author 金杰 , maillank@qq.com
 * @since 2022-11-29 22:07:27
 */
 -->
 <!DOCTYPE html>
<html style="background-color: #FFFFFF;">

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8"/>
	<title th:text="${lang.translate('数据库')}">数据库</title>
    <link th:if(theme.ico!="null") rel="shortcut icon" th:href="${theme.ico}" type="image/vnd.microsoft.icon">
    <link th:if(theme.ico!="null") rel="icon" th:href="theme.ico" type="image/vnd.microsoft.icon">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/assets/libs/layui/css/layui.css" th:href="'/assets/libs/layui/css/layui.css?'+${cacheKey}"/>
    <link rel="stylesheet" href="/assets/css/admin.css" th:href="'/assets/css/admin.css?'+${cacheKey}"/>
    <link rel="stylesheet" href="/assets/libs/toast/css/toast.css" type="text/css" th:href="'/assets/libs/toast/css/toast.css?'+${cacheKey}">
    <link rel="stylesheet" href="/assets/css/foxnic-web.css" th:href="'/assets/css/foxnic-web.css?'+${cacheKey}"/>
    <link href="/assets/libs/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="/assets/libs/material-design-webfont/css/material-design-icons-min.css" rel="stylesheet">
    <script th:inline="javascript">var foxnic_cachekey=[[${cacheKey}]];</script>
    <style>
    </style>
    <link th:each="css:${theme.css}" rel="stylesheet" th:href="${css}+'?'+${cacheKey}">
</head>

<body style="overflow-y: hidden;">
<div class="form-container" >

    <form id="data-form" lay-filter="data-form" class="layui-form model-form" style="display:none">

        <input name="id" id="id"  type="hidden"/>

         <!--开始：group 循环-->


        <div class="layui-row form-row" id="random-5731-content">

             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column" >

                <!-- select_box : 主机名称 ,  hostId  -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('主机名称')}">主机名称</div></div>
                    <div class="layui-input-block ">
                        <div id="hostId" input-type="select" th:data="${'/service-ops/ops-host/query-paged-list'}" extraParam="{}"></div>
                    </div>
                </div>
            
                <!-- text_input : 数据库名 ,  name -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('数据库名')}">数据库名</div><div class="layui-required">*</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="name" id="name" name="name" th:placeholder="${ lang.translate('请输入'+'数据库名') }" type="text" class="layui-input"    lay-verify="|required"  />
                    </div>
                </div>
            
                <!-- radio_box : 数据库状态 ,  status  -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('数据库状态')}">数据库状态</div><div class="layui-required">*</div></div>
                    <div class="layui-input-block ">
                        <input input-type="radio" type="radio" name="status" lay-filter="status" th:each="e,stat:${enum.toArray('com.dt.platform.constants.enums.ops.OpsDbStatusEnum')}" th:value="${e.code}" th:title="${e.text}" th:checked="${(e.code=='' || stat.index==0)}">
                    </div>
                </div>
            
                <!-- select_box : 库类型 ,  typeId  -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('库类型')}">库类型</div><div class="layui-required">*</div></div>
                    <div class="layui-input-block ">
                        <div id="typeId" input-type="select" th:data="${'/service-ops/ops-service-info/query-paged-list?groupId=db'}" extraParam="{}"></div>
                    </div>
                </div>
            
                <!-- select_box : 标签 ,  labelIds  -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('标签')}">标签</div></div>
                    <div class="layui-input-block ">
                        <div id="labelIds" input-type="select" th:data="${'/service-system/sys-dict-item/query-list?dictCode=ops_db_label'}" extraParam="{}"></div>
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column" >

                <!-- select_box : 部署模式 ,  deployMode  -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('部署模式')}">部署模式</div><div class="layui-required">*</div></div>
                    <div class="layui-input-block ">
                        <div id="deployMode" input-type="select" th:data="${'/service-system/sys-dict-item/query-list?dictCode=ops_db_deploy_mode'}" extraParam="{}"></div>
                    </div>
                </div>
            
                <!-- radio_box : 日志模式 ,  logMethod  -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('日志模式')}">日志模式</div><div class="layui-required">*</div></div>
                    <div class="layui-input-block ">
                        <input input-type="radio" type="radio" name="logMethod" lay-filter="logMethod" th:each="e,stat:${dict.toArray('ops_db_log_method')}" th:value="${e.code}" th:title="${e.text}"  th:checked="${(e.code=='' || stat.index==0)}">
                    </div>
                </div>
            
                <!-- text_input : 服务端口 ,  dbPort -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('服务端口')}">服务端口</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="dbPort" id="dbPort" name="dbPort" th:placeholder="${ lang.translate('请输入'+'服务端口') }" type="text" class="layui-input"  />
                    </div>
                </div>
            
                <!-- number_input : 大小(M) ,  dbSize  -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('大小(M)')}">大小(M)</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="dbSize" id="dbSize" name="dbSize" th:placeholder="${ lang.translate('请输入'+'大小(M)') }" type="text" class="layui-input"   autocomplete="off" input-type="number_input" integer="true" decimal="false" allow-negative="true" step="1.0"   scale="0"  value="0.0" />
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->


        <div class="layui-row form-row" id="random-2812-content">

             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs12 form-column"  style="padding-top: 0px" >

                <!-- text_input : 备注 ,  notes -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('备注')}">备注</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="notes" id="notes" name="notes" th:placeholder="${ lang.translate('请输入'+'备注') }" type="text" class="layui-input"  />
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->

        <fieldset class="layui-elem-field layui-field-title form-group-title" id="random-0201-fieldset">
            <legend>用户及凭证</legend>
        </fieldset>

        <div class="layui-row form-row" id="random-0201-content">

             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column" >

                <!-- text_input : 管理员账户 ,  adminUserList -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('管理员账户')}">管理员账户</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="adminUserList" id="adminUserList" name="adminUserList" th:placeholder="${ lang.translate('请输入'+'管理员账户') }" type="text" class="layui-input"  />
                    </div>
                </div>
            
                <!-- text_input : 应用账户 ,  appUserList -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('应用账户')}">应用账户</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="appUserList" id="appUserList" name="appUserList" th:placeholder="${ lang.translate('请输入'+'应用账户') }" type="text" class="layui-input"  />
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column" >

                <!-- text_input : 运维账户 ,  opsUserList -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('运维账户')}">运维账户</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="opsUserList" id="opsUserList" name="opsUserList" th:placeholder="${ lang.translate('请输入'+'运维账户') }" type="text" class="layui-input"  />
                    </div>
                </div>
            
                <!-- text_input : 其他账户 ,  otherUserList -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('其他账户')}">其他账户</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="otherUserList" id="otherUserList" name="otherUserList" th:placeholder="${ lang.translate('请输入'+'其他账户') }" type="text" class="layui-input"  />
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->


        <div class="layui-row form-row" id="random-7420-content">

             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs12 form-column"  style="padding-top: 0px" >

                <!-- text_input : 使用情况 ,  userUseInfo -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('使用情况')}">使用情况</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="userUseInfo" id="userUseInfo" name="userUseInfo" th:placeholder="${ lang.translate('请输入'+'使用情况') }" type="text" class="layui-input"  />
                    </div>
                </div>
            
                <!-- text_area : 凭证信息 ,  voucherStr  -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('凭证信息')}">凭证信息</div></div>
                    <div class="layui-input-block ">
                        <textarea lay-filter="voucherStr" id="voucherStr" name="voucherStr" th:placeholder="${ lang.translate('请输入'+'凭证信息') }" class="layui-textarea" style="height: 60px" ></textarea>
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->

        <fieldset class="layui-elem-field layui-field-title form-group-title" id="random-0255-fieldset">
            <legend>备份信息</legend>
        </fieldset>

        <div class="layui-row form-row" id="random-0255-content">

             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs12 form-column" >

                <!-- radio_box : 备份状态 ,  backupStatus  -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('备份状态')}">备份状态</div><div class="layui-required">*</div></div>
                    <div class="layui-input-block ">
                        <input input-type="radio" type="radio" name="backupStatus" lay-filter="backupStatus" th:each="e,stat:${enum.toArray('com.dt.platform.constants.enums.ops.OpsDbBackupStatusEnum')}" th:value="${e.code}" th:title="${e.text}" th:checked="${(e.code=='' || stat.index==0)}">
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->


        <div class="layui-row form-row" id="random-4574-content">

             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column"  style="padding-top: 0px" >

                <!-- text_input : 本地备份策略 ,  backupStrategy -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('本地备份策略')}">本地备份策略</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="backupStrategy" id="backupStrategy" name="backupStrategy" th:placeholder="${ lang.translate('请输入'+'本地备份策略') }" type="text" class="layui-input"  />
                    </div>
                </div>
            
                <!-- text_input : 工具备份策略 ,  toolStrategy -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('工具备份策略')}">工具备份策略</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="toolStrategy" id="toolStrategy" name="toolStrategy" th:placeholder="${ lang.translate('请输入'+'工具备份策略') }" type="text" class="layui-input"  />
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
             <!--开始：column 循环-->
            <!-- 只有当非第一个分组没有title时才使 padding-top 为 0 -->
            <div class="layui-col-xs6 form-column"  style="padding-top: 0px" >

                <!-- text_input : 灾备策略 ,  disasterRecoveryStrategy -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('灾备策略')}">灾备策略</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="disasterRecoveryStrategy" id="disasterRecoveryStrategy" name="disasterRecoveryStrategy" th:placeholder="${ lang.translate('请输入'+'灾备策略') }" type="text" class="layui-input"  />
                    </div>
                </div>
            
                <!-- text_input : 清理策略 ,  clearStrategy -->
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('清理策略')}">清理策略</div></div>
                    <div class="layui-input-block ">
                        <input lay-filter="clearStrategy" id="clearStrategy" name="clearStrategy" th:placeholder="${ lang.translate('请输入'+'清理策略') }" type="text" class="layui-input"  />
                    </div>
                </div>
            <!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->
        <fieldset class="layui-elem-field layui-field-title form-group-title" id="random-3106-fieldset">
        <legend>备份情况</legend>
        </fieldset>
        <div class="layui-row form-row" style="text-align: center;" id="random-3106-content">
            <div style="display: inline-block;padding-right: 8px;padding-left: 8px" class="layui-col-xs12">
            <iframe id="random-3106-iframe" js-fn="backInfoList" class="form-iframe" frameborder="0" style="width: 100%"></iframe>
            </div>
        </div>
        <!--结束：group循环-->

        <div style="height: 8px"></div>
        <div style="height: 50px"></div>


    </form>

</div>
<div class="model-form-footer">
    <button class="layui-btn layui-btn-primary" id="cancel-button" lay-filter="cancel-button" type="button" th:text="${lang.translate('取消','','form.button')}" >取消</button>
    <button th:if="${perm.checkAnyAuth('ops_db_info:create','ops_db_info:update','ops_db_info:save')}" class="layui-btn" style="margin-right: 15px;display: none;"  id="submit-button" lay-filter="submit-button" lay-submit th:text="${lang.translate('保存','','form.button')}">保存</button>
</div>

<script type="text/javascript" src="/module/global.js" th:src="'/module/global.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/jquery-3.2.1.min.js" th:src="'/assets/libs/jquery-3.2.1.min.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/pandyle.min.js" th:src="'/assets/libs/pandyle.min.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/layui/layui.js" th:src="'/assets/libs/layui/layui.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/toast/js/toast.js" th:src="'/assets/libs/toast/js/toast.js?'+${cacheKey}"></script>
<script th:inline="javascript">
    var LAYUI_TABLE_WIDTH_CONFIG = [[${layuiTableWidthConfig}]];
    var RADIO_STATUS_DATA = [[${enum.toArray('com.dt.platform.constants.enums.ops.OpsDbStatusEnum')}]];
    var RADIO_BACKUPSTATUS_DATA = [[${enum.toArray('com.dt.platform.constants.enums.ops.OpsDbBackupStatusEnum')}]];
    var RADIO_LOGMETHOD_DATA = [[${dict.toArray('ops_db_log_method')}]];
    var VALIDATE_CONFIG={"backupStatus":{"labelInForm":"备份状态","inputType":"radio_box","required":true},"deployMode":{"labelInForm":"部署模式","inputType":"select_box","required":true},"name":{"labelInForm":"数据库名","inputType":"text_input","required":true},"logMethod":{"labelInForm":"日志模式","inputType":"radio_box","required":true},"typeId":{"labelInForm":"库类型","inputType":"select_box","required":true},"status":{"labelInForm":"数据库状态","inputType":"radio_box","required":true}};
    var AUTH_PREFIX="ops_db_info";


</script>



<script th:src="'/business/ops/db_info/db_info_ext.js?'+${cacheKey}"></script>
<script th:src="'/business/ops/db_info/db_info_form.js?'+${cacheKey}"></script>

</body>
</html>